using Boo.Lang;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using UnityEngine;

[Serializable]
public class ArcadeTop : MonoBehaviour
{
	[Serializable]
	[CompilerGenerated]
	internal sealed class _0024led_0024249 : GenericGenerator<WaitForSeconds>
	{
		internal ArcadeTop _0024self__0024251;

		public _0024led_0024249(ArcadeTop self_)
		{
			_0024self__0024251 = self_;
		}

		public override IEnumerator<WaitForSeconds> GetEnumerator()
		{
			return new _0024(_0024self__0024251);
		}
	}

	private Rigidbody rigi;

	private Transform tr;

	public GameObject finished;

	public spin Player;

	public int state;

	public score score;

	public void Start()
	{
		rigi = GetComponent<Rigidbody>();
		tr = GetComponent<Transform>();
		StartCoroutine(led());
		if (!score)
		{
			score = (GameObject.Find("Score").GetComponent("score") as score);
		}
		InvokeRepeating("check", 0f, 0.2f);
	}

	public void check()
	{
		if (state != 1 || !(rigi.angularVelocity.sqrMagnitude < 50f))
		{
			Vector3 position = tr.position;
			if (position.y >= -100f)
			{
				return;
			}
		}
		StateManager.playing = false;
		finished.SetActive(value: true);
		Time.timeScale = 0.2f;
		Time.fixedDeltaTime = 0.0066f;
		state = 0;
	}

	public IEnumerator led()
	{
		return new _0024led_0024249(this).GetEnumerator();
	}

	public void Main()
	{
	}
}
